<?php
require_once('./modules/config.inc');
require_once('./modules/log.inc');

Log::getInstance()->write('CRON IS RUNNING',2);

$config = Config::getInstance();

$batches = $config->getConfig("./features/*[@enabled='1']/batch");

foreach($batches as $batch)
{
	$location = $batch[0][0];
	Log::getInstance()->write('==>>> running '.$location,2);
	try
	{
		require_once($location);
	}
	catch(Exception $ex)
	{
		Log::getInstance()->write($ex->getMessage(),1);
	}
}
?>